import 'package:flutter/material.dart';
import 'package:dio/dio.dart';

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // getHttp();
    return Scaffold(
        body: Center(
          child: Text("首页"),
        ),
      );
  }

  void getHttp() async{
    try {
      Response response;
      var data = {"name":"技术胖"};
      var url = "https://www.easy-mock.com/mock/5c60131a4bed3a6342711498/baixing/dabaojian?name=小姐姐";
      response = await Dio().get(url);
      return print(response.data);
    } catch (e) {
      return print(e);
    }
  }
}